import { defineStore } from 'pinia';
import type { IHeaderMenuItem } from '@/types/menu';
export const useMenuStore = defineStore('useMenuStore', {
  state: () => ({
    activeHeaderMenuItem: {
      id: '',
      menuCode: '',
      menuName: '',
      frameName: '',
      frameColor: '',
      menuUrl: '',
    } as IHeaderMenuItem,
  }),

  actions: {
    setActiveHeaderMenuItem(headerMenuItem: IHeaderMenuItem) {
      this.activeHeaderMenuItem = headerMenuItem;
    },
    getActiveHeaderMenuItem() {
      return this.activeHeaderMenuItem;
    },
  },
});
